package routers

import (
	"B2Cshop/controllers"

	"github.com/astaxie/beego"
)

func init() {
	beego.Router("/", &controllers.MainController{})

	beego.Router("/user_list", &controllers.UserControllers{})
	beego.Router("/user/register", &controllers.UserControllers{}, "post:UserRegister")
	beego.Router("/user/login", &controllers.UserControllers{}, "post:Login")
	beego.Router("/user/center", &controllers.UserControllers{}, "post:UserCenter")
	beego.Router("/user/setNickname", &controllers.UserControllers{}, "post:SetUserNickname")
	beego.Router("/user/setPassword", &controllers.UserControllers{}, "post:SetUserPassword")

	//商品模块
	beego.Router("/goods/add", &controllers.GoodsControllers{}, "post:AddGoods")
	beego.Router("/goods/update", &controllers.GoodsControllers{}, "post:UpdateGoods")
	beego.Router("/goods/addType", &controllers.GoodsControllers{}, "post:AddGoodsType")
	beego.Router("/goods/updateType", &controllers.GoodsControllers{}, "post:UpdateGoodsType")
	beego.Router("/goods/addTypeSeo", &controllers.GoodsControllers{}, "post:AddGoodsTypeSeo")
	beego.Router("/goods/typeList", &controllers.GoodsControllers{}, "post:GoodsTypeList")
	beego.Router("/goods/addSeo", &controllers.GoodsControllers{}, "post:AddGoodsSeo")
	// beego.Router("/goods/updateSeo", &controllers.GoodsControllers{}, "post:SetGoodsSeo")
}
